<template>
	<view>
		<view class="cu-form-group">
			<view class="title">{{labelName}}<text class="lg text-gray cuIcon-question"></text></view>
			<input auto-height ref="myTest" :placeholder="placeholder" :name="labelPath" v-model="choseNames" :disabled="!allowInput"></input>
			<button :style="{backgroundColor:theme}" class='cu-btn shadow text-white' @tap.stop="initData()">选择</button>
		</view>
		<view class="cu-modal bottom-modal show" :class="isShow == true?'show':''">
			<view class="cu-dialog">
				<view class="cu-bar bg-white">
					<view class="action text-blue" @tap.stop="__hide">取消</view>
					<view class="action text-blue" @tap.stop="choseClearAll">已选择({{choseCount}}/{{count}})</view>
					<view class="action text-green" @tap.stop="__confirm">确定</view>
				</view>
				<view class="cu-bar search bg-white">
					<view class="search-form round">
						<text class="cuIcon-search"></text>
						<input v-model="refName" :adjust-position="false" type="text" :placeholder="plache" confirm-type="search"></input>
					</view>
					<view class="action">
						<button class="cu-btn bg-gradual-blue shadow-blur round" @tap="searchList">搜索</button>
					</view>
				</view>
				<scroll-view scroll-y="true" style="height:70vh">
					<view class="cu-list menu" :class="[menuBorder?'sm-border':'',menuCard?'card-menu margin-top':'']">
						<view class="cu-item" :class="menuArrow?'arrow':''" v-for="val in 20">
							<view class="content">
								<text class="cuIcon-circlefill text-grey"></text>
								<text class="text-grey">图标 + 标题</text>
							</view>
						</view>
					</view>
				</scroll-view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex'
	// input输入绑定
	// input:number绑定
	// input:number小数限制两位
	// 日期时间选择控件
	export default {
		name: 'js-input',
		behaviors: ['uni://form-field-group'],
		data() {
			return {

			}
		},
		computed: {
			...mapState(["theme"])
		},
		props: {
			labelName: {
				type: String,
				default: ''
			},
			path: {
				type: String,
				default: ''
			},
			value: {
				type: String,
				default: ''
			}
		}
	}
</script>

<style>
</style>
